Skip to content

Conversation

@JohananOppongAmoateng
Copy link
Contributor

This PR implements automatic filtering of popup change lists for raw ID fields when they point to polymorphic models.

Closes #144

@codecov
Copy link

codecov bot commented Dec 27, 2025

Codecov Report

❌ Patch coverage is 86.20690% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.13%. Comparing base (8faed6b) to head (a9614d8).

Files with missing lines Patch % Lines
src/polymorphic/admin/widgets.py 81.81% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #765      +/-   ##
==========================================
+ Coverage   84.09%   84.13%   +0.03%     
==========================================
  Files          27       28       +1     
  Lines        1610     1639      +29     
  Branches      253      258       +5     
==========================================
+ Hits         1354     1379      +25     
- Misses        195      198       +3     
- Partials       61       62       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JohananOppongAmoateng JohananOppongAmoateng self-assigned this Dec 29, 2025
@bckohan bckohan force-pushed the foreignkeyrawwidget branch from 0957152 to be67398 Compare January 6, 2026 21:21
@bckohan bckohan force-pushed the foreignkeyrawwidget branch from be67398 to a9614d8 Compare January 7, 2026 08:38
@bckohan
Copy link
Collaborator

bckohan commented Jan 7, 2026

I'm closing the related issue as won't fix. This convenience function is either too specific to the user or has been fixed. I have tested the scenario where child models A and B have M2M fields to each other and the raw ids correctly only show A or Bs respectively. The user may have put a self referential M2M relationship in the base class and in that case showing ids for all child model types is correct behavior.

@bckohan bckohan closed this Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can django-polymorphic filter the popup change list for raw ID fields?

2 participants